package com.cc.springboot.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import com.cc.springboot.entity.UserEntity;

@CacheConfig(cacheNames = "baseCache")
public interface UserMapper {

	@Select("select * from users where username=#{name}")
	@Cacheable
	UserEntity findName(@Param("name") String name);

}